source("../R/convert2016.R") nbi <- convert2016("C:/Users/mille/Data/2016hwybronlyonefile.zip") library(animation) library(tidyverse) ne <- subset(nbi, stateCode == "NE") nested <- nest(group_by(ne, yearBuilt)) nested <- nested[order(nested$yearBuilt), ] bridgeDraw <- function(df, year){ maps::map("state", "neb") points(df$longitude, df$latitude, pch = 17) title(as.character(year)) } saveHTML(purrr::map2(nested$data, nested$yearBuilt, bridgeDraw), htmlfile = "nebraska.html", autobrowse = FALSE)
htmltools::includeHTML("./nebraska.html")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.